home *** CD-ROM | disk | FTP | other *** search
Text File | 2011-12-21 | 39.5 KB | 1,074 lines |
- class com.mosesSupposes.fuse.ZManager
- {
- var tweens;
- var now;
- var numTweens = 0;
- function ZManager()
- {
- this.tweens = {};
- this.numTweens = 0;
- }
- function addTween(obj, props, endvals, seconds, ease, delay, callback)
- {
- var _loc24_ = callback.skipLevel != undefined ? callback.skipLevel : 0;
- var _loc44_ = callback.cycles != undefined ? callback.cycles : 1;
- var _loc30_ = callback.extra1;
- var _loc29_ = callback.extra2;
- var _loc23_ = [];
- var _loc14_ = _global.com.mosesSupposes.fuse.FuseFMP;
- var _loc43_ = String("|" + _loc14_.getAllShortcuts().join("|") + "|");
- var _loc42_ = com.mosesSupposes.fuse.FuseKitCommon._cts();
- var _loc25_ = "";
- var _loc28_ = "";
- var _loc22_ = obj.__zigoID__;
- var _loc7_ = this.tweens[String(_loc22_)];
- if(_loc7_ != undefined && com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)
- {
- if(obj._listeners.length > 0)
- {
- for(var _loc40_ in _loc7_.props)
- {
- _loc23_.unshift(_loc40_);
- }
- }
- _loc7_.numProps = 0;
- this.cleanUp(true);
- }
- for(var _loc47_ in props)
- {
- var _loc5_ = props[_loc47_];
- var _loc4_ = endvals[_loc47_];
- var _loc15_ = 0;
- if(_loc5_ == "_fade")
- {
- _loc5_ = "_alpha";
- _loc15_ = _loc4_ >= 50 ? 1 : -1;
- }
- var _loc16_ = _loc42_.indexOf("|" + _loc5_ + "|") > -1;
- var _loc18_ = _loc7_.colorProp;
- if(_loc7_ != undefined)
- {
- if(_loc16_ == true && _loc18_ != undefined)
- {
- _loc23_.unshift(_loc18_);
- delete _loc7_.props[_loc18_];
- delete _loc7_.colorProp;
- _loc7_.numProps = _loc7_.numProps - 1;
- }
- else if(_loc7_.props[_loc5_] != undefined)
- {
- _loc23_.unshift(_loc5_);
- delete _loc7_[_loc5_];
- _loc7_.numProps = _loc7_.numProps - 1;
- }
- }
- var _loc3_ = {c:-1,fmp:-1,complex:-1};
- var _loc11_ = _loc24_ == 0 && seconds + delay == 0 || _loc24_ > 0 && seconds == 0;
- var _loc10_ = false;
- var _loc13_ = _loc14_ != undefined && _loc43_.indexOf("|" + _loc5_ + "|") > -1;
- var _loc19_ = _loc5_.toLowerCase().indexOf("colors") > -1 && _loc4_ instanceof Array;
- var _loc27_ = _loc13_ == true && _loc5_.indexOf("lor") > -1 && _loc5_.charAt(2) != "l";
- if(_loc13_ == true)
- {
- _loc3_.fmp = _loc14_;
- _loc3_.ps = _loc14_.getFilterProp(obj,_loc5_,true);
- _loc3_.special = true;
- }
- if(_loc16_ == true || _loc19_ == true || _loc27_ && _loc11_ == false)
- {
- _loc3_.complex = 1;
- if(_loc16_ == true)
- {
- _loc3_.c = new Color(obj);
- _loc3_.ps = Color(_loc3_.c).getTransform();
- var _loc17_ = !(_loc5_ == "_tint" || _loc5_ == "_tintPercent" || _loc5_ == "_colorReset") ? _loc5_.slice(1) : "tint";
- var _loc9_ = null;
- var _loc12_ = null;
- if(_loc5_ != "_colorTransform")
- {
- if(_loc17_ == "tint")
- {
- if(typeof _loc4_ == "object")
- {
- _loc12_ = _loc4_.tint;
- _loc9_ = _global.isNaN(_loc4_.percent) != true ? _loc4_.percent : 100;
- }
- else if(_loc5_ == "_tintPercent" || _loc5_ == "_colorReset")
- {
- var _loc20_ = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
- if(_loc5_ == "_colorReset")
- {
- _loc9_ = Math.min(_loc20_,100 - Math.abs(Number(_loc4_)));
- }
- else
- {
- _loc9_ = typeof _loc4_ != "string" ? Number(_loc4_) : (_loc20_ || 0) + Number(_loc4_);
- }
- _loc9_ = Math.max(0,Math.min(_loc9_,100));
- _loc12_ = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
- }
- else
- {
- _loc12_ = _loc4_;
- _loc9_ = 100;
- }
- }
- else
- {
- _loc9_ = typeof _loc4_ != "string" ? _loc4_ : (com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_loc17_] || 0) + Number(_loc4_);
- }
- _loc4_ = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_loc17_,_loc9_,_loc12_);
- }
- if(_loc11_ == true)
- {
- if(_loc5_ == "_colorTransform")
- {
- Color(_loc3_.c).setTransform(_loc4_);
- }
- else
- {
- com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj,_loc17_,_loc9_,_loc12_);
- }
- }
- else
- {
- var _loc21_ = this.getChangeObj(_loc3_.ps,_loc4_,false,false);
- _loc3_.ch = _loc21_.map;
- if(_loc21_.changed == true)
- {
- _loc10_ = true;
- }
- }
- }
- else if(_loc11_ == true)
- {
- _loc14_.setFilterProp(obj,_loc5_,_loc4_);
- }
- else if(_loc19_ == true)
- {
- _loc3_.c = 2;
- _loc3_.ch = [];
- for(_loc40_ in _loc4_)
- {
- if(_loc4_[_loc40_] != null)
- {
- if(_loc3_.ps == null)
- {
- _loc3_.ps = [];
- }
- _loc3_.ps[_loc40_] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc3_.ps[_loc40_] != null ? _loc3_.ps[_loc40_] : obj[_loc5_][_loc40_]);
- _loc21_ = this.getChangeObj(_loc3_.ps[_loc40_],com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc4_[_loc40_]),true,false);
- _loc3_.ch[_loc40_] = _loc21_.map;
- if(_loc21_.changed == true)
- {
- _loc10_ = true;
- }
- }
- }
- }
- else
- {
- _loc3_.c = 1;
- _loc3_.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc3_.ps);
- _loc21_ = this.getChangeObj(_loc3_.ps,com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint",100,_loc4_),true,false);
- _loc3_.ch = _loc21_.map;
- if(_loc21_.changed == true)
- {
- _loc10_ = true;
- }
- }
- }
- else if(_loc5_ == "_bezier_")
- {
- this.removeTween(obj,"_x,_y",true);
- if(_loc11_ == true)
- {
- if(_loc4_.x != null && _global.isNaN(Number(_loc4_.x)) == false)
- {
- obj._x = typeof _loc4_.x != "string" ? _loc4_.x : obj._x + Number(_loc4_.x);
- }
- if(_loc4_.y != null && _global.isNaN(Number(_loc4_.y)) == false)
- {
- obj._y = typeof _loc4_.y != "string" ? _loc4_.y : obj._y + Number(_loc4_.y);
- }
- }
- else
- {
- _loc3_.special = true;
- _loc3_.ps = 0;
- _loc3_.ch = 1;
- _loc3_.bz = {sx:obj._x,sy:obj._y};
- if(_loc4_.x == null || _global.isNaN(Number(_loc4_.x)))
- {
- _loc4_.x = _loc3_.bz.sx;
- }
- if(_loc4_.y == null || _global.isNaN(Number(_loc4_.y)))
- {
- _loc4_.y = _loc3_.bz.sy;
- }
- _loc3_.bz.chx = typeof _loc4_.x != "string" ? _loc4_.x - _loc3_.bz.sx : Number(_loc4_.x);
- if(_global.isNaN(_loc3_.bz.chx) == true)
- {
- _loc3_.bx.chx = 0;
- }
- _loc3_.bz.chy = typeof _loc4_.y != "string" ? _loc4_.y - _loc3_.bz.sy : Number(_loc4_.y);
- if(_global.isNaN(_loc3_.bz.chy) == true)
- {
- _loc3_.bx.chy = 0;
- }
- if(_loc4_.controlX == null || _global.isNaN(Number(_loc4_.controlX)))
- {
- _loc3_.bz.ctrlx = _loc3_.bz.sx + _loc3_.bz.chx / 2;
- }
- else
- {
- _loc3_.bz.ctrlx = typeof _loc4_.controlX != "string" ? _loc4_.controlX : _loc3_.bz.sx + Number(_loc4_.controlX);
- }
- if(_loc4_.controlY == null || _global.isNaN(Number(_loc4_.controlY)))
- {
- _loc3_.bz.ctrly = _loc3_.bz.sy + _loc3_.bz.chy / 2;
- }
- else
- {
- _loc3_.bz.ctrly = typeof _loc4_.controlY != "string" ? _loc4_.controlY : _loc3_.bz.sy + Number(_loc4_.controlY);
- }
- _loc3_.bz.ctrlx -= _loc3_.bz.sx;
- _loc3_.bz.ctrly -= _loc3_.bz.sy;
- _loc10_ = _loc3_.bz.chx + _loc3_.bz.chy != 0;
- }
- }
- else
- {
- if(typeof _loc4_ == "object")
- {
- _loc3_.complex = !(_loc4_ instanceof Array) ? 1 : 0;
- }
- if(_loc5_ == "_x" || _loc5_ == "_y")
- {
- this.removeTween(obj,"_bezier_",true);
- }
- if(_loc5_ == "_frame" && typeof obj == "movieclip")
- {
- _loc3_.ps = obj._currentframe;
- _loc3_.special = true;
- }
- else if(_loc13_ == false)
- {
- if(_loc3_.complex > -1)
- {
- _loc3_.ps = _loc3_.complex != 0 ? {} : [];
- for(_loc40_ in _loc4_)
- {
- _loc3_.ps[_loc40_] = obj[_loc5_][_loc40_];
- }
- }
- else
- {
- _loc3_.ps = obj[_loc5_];
- }
- }
- if(_loc11_ == true)
- {
- if(_loc13_ == true)
- {
- _loc14_.setFilterProp(obj,_loc5_,typeof _loc4_ != "string" ? _loc4_ : _loc3_.ps + Number(_loc4_));
- }
- else if(_loc3_.complex > -1)
- {
- for(_loc40_ in _loc4_)
- {
- if(_loc4_[_loc40_] != null && _global.isNaN(Number(_loc4_[_loc40_])) == false)
- {
- obj[_loc5_][_loc40_] = typeof _loc4_[_loc40_] != "string" ? _loc4_[_loc40_] : _loc3_.ps[_loc40_] + Number(_loc4_[_loc40_]);
- if(_global.isNaN(obj[_loc5_][_loc40_]) == true)
- {
- obj[_loc5_][_loc40_] = 0;
- }
- }
- }
- }
- else
- {
- obj[_loc5_] = typeof _loc4_ != "string" ? _loc4_ : _loc3_.ps + Number(_loc4_);
- if(_loc15_ == 1)
- {
- obj._visible = true;
- }
- else if(_loc15_ == -1)
- {
- obj._visible = false;
- }
- }
- }
- else if(_loc3_.complex > -1)
- {
- _loc21_ = this.getChangeObj(_loc3_.ps,_loc4_,_loc13_,_loc3_.complex == 0);
- _loc3_.ch = _loc21_.map;
- if(_loc21_.changed == true)
- {
- _loc10_ = true;
- }
- }
- else
- {
- if(_loc4_ == null || _global.isNaN(Number(_loc4_)))
- {
- _loc4_ = _loc3_.ps;
- }
- _loc3_.ch = typeof _loc4_ != "string" ? Number(_loc4_) - _loc3_.ps : Number(_loc4_);
- if(_global.isNaN(_loc3_.ch) == true)
- {
- _loc3_.ch = 0;
- }
- _loc10_ = _loc3_.ch != 0;
- }
- }
- if(_loc24_ == 0 && (_loc10_ == true || _loc11_ == false) || _loc10_ == true && _loc11_ == false)
- {
- if(_loc3_.complex > -1 && _loc3_.c !== 2)
- {
- _loc3_.ps = [_loc3_.ps];
- _loc3_.ch = [_loc3_.ch];
- }
- _loc3_.ts = this.now + delay * 1000;
- _loc3_.pt = -1;
- _loc3_.d = seconds * 1000;
- _loc3_.ef = ease;
- _loc3_.sf = false;
- _loc3_.cycles = _loc44_;
- if(_loc30_ != undefined)
- {
- _loc3_.e1 = _loc30_;
- }
- if(_loc29_ != undefined)
- {
- _loc3_.e2 = _loc29_;
- }
- _loc3_.v = _loc15_;
- if(callback.start != undefined)
- {
- _loc3_.scb = callback.start;
- }
- if(callback.upd != undefined)
- {
- _loc3_.ucb = callback.upd;
- }
- if(callback.end != undefined)
- {
- _loc3_.ecb = callback.end;
- }
- if(callback.roundResults != undefined)
- {
- _loc3_.rr = callback.roundResults;
- }
- if(this.tweens[String(_loc22_)] == undefined)
- {
- var _loc0_ = null;
- _loc7_ = this.tweens[String(_loc22_)] = {numProps:0,locked:false,targ:obj,targID:String("\"" + (obj._name == undefined ? obj.toString() : obj._name) + "\""),targZID:_loc22_,props:{}};
- this.numTweens = this.numTweens + 1;
- }
- if(_loc16_ == true)
- {
- _loc7_.colorProp = _loc5_;
- }
- _loc7_.props[_loc5_] = _loc3_;
- _loc7_.numProps = _loc7_.numProps + 1;
- _loc25_ = _loc5_ + "," + _loc25_;
- _loc28_ = (typeof _loc4_ != "string" ? _loc4_ : "\"" + _loc4_ + "\"") + "," + _loc28_;
- }
- _loc3_ = undefined;
- }
- if(_loc7_ == undefined || _loc7_.numProps <= 0)
- {
- this.cleanUp();
- }
- if(_loc23_.length > 0 && com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)
- {
- com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt",{target:obj,props:_loc23_,__zigoID__:_loc22_,during:"add"});
- }
- if(_loc25_ == "")
- {
- if(_loc24_ == 2)
- {
- if(com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2)
- {
- com.mosesSupposes.fuse.FuseKitCommon.error("011",obj._name == undefined ? obj.toString() : obj._name,props.toString());
- }
- }
- else
- {
- var _loc48_ = obj._listeners.length > 0;
- if(_loc48_ == true)
- {
- obj.broadcastMessage("onTweenStart",{target:obj,props:props});
- }
- if(callback.start != undefined)
- {
- callback.start.f.apply(callback.start.s,callback.start.a);
- }
- if(_loc48_ == true)
- {
- obj.broadcastMessage("onTweenUpdate",{target:obj,props:props});
- }
- if(callback.upd != undefined)
- {
- callback.upd.f.apply(callback.upd.s,callback.upd.a);
- }
- if(_loc48_ == true)
- {
- obj.broadcastMessage("onTweenEnd",{target:obj,props:props});
- }
- if(callback.end != undefined)
- {
- callback.end.f.apply(callback.end.s,callback.end.a);
- }
- }
- this.cleanUp();
- }
- if(com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2)
- {
- if(_loc25_ == "")
- {
- com.mosesSupposes.fuse.FuseKitCommon.error("012",obj._name == undefined ? obj.toString() : obj._name,props.toString(),endvals.toString());
- }
- else
- {
- com.mosesSupposes.fuse.FuseKitCommon.error("013",obj._name == undefined ? obj.toString() : obj._name,_loc25_.slice(0,-1),_loc28_.slice(0,-1));
- }
- }
- return _loc25_ != "" ? _loc25_.slice(0,-1) : null;
- }
- function removeTween(targs, props, noInit)
- {
- var _loc4_ = {};
- var _loc12_ = this.paramsObj(targs,props);
- if(_loc12_.none == true)
- {
- return undefined;
- }
- var _loc16_ = _loc12_.all;
- var _loc17_ = _loc12_.allprops;
- var _loc9_ = _loc16_ != true ? Object(_loc12_.tg) : this.tweens;
- var _loc8_ = false;
- for(var _loc20_ in _loc9_)
- {
- var _loc3_ = _loc16_ != true ? String(_loc9_[_loc20_].__zigoID__) : _loc20_;
- var _loc2_ = this.tweens[_loc3_];
- var _loc6_ = _loc17_ != true ? _loc12_.props : _loc2_.props;
- for(var _loc14_ in _loc6_)
- {
- var _loc5_ = _loc14_ == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR && _loc2_.colorProp != undefined;
- if(_loc2_.props[_loc14_] != undefined || _loc5_ == true)
- {
- if(_loc4_[_loc3_] == null)
- {
- _loc4_[_loc3_] = [];
- }
- _loc4_[_loc3_].unshift(_loc14_);
- if(_loc14_ == _loc2_.colorProp || _loc5_ == true)
- {
- delete _loc2_.props[_loc2_.colorProp];
- delete _loc2_.colorProp;
- }
- else
- {
- delete _loc2_.props[_loc14_];
- }
- _loc2_.numProps = _loc2_.numProps - 1;
- if(_loc2_.numProps <= 0)
- {
- _loc8_ = true;
- break;
- }
- }
- }
- }
- if(com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)
- {
- for(var _loc19_ in _loc4_)
- {
- var _loc7_ = this.tweens[_loc19_].targ;
- com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt",{target:(typeof _loc7_.addProperty != "function" ? "[MISSING(\"" + this.tweens[_loc19_].targID + "\")]" : _loc7_),props:_loc4_[_loc19_],__zigoID__:this.tweens[_loc19_].targZID,during:(noInit != true ? "remove" : "add")});
- }
- }
- if(_loc8_ == true)
- {
- this.cleanUp(noInit);
- }
- }
- function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo)
- {
- if(type == "lock")
- {
- this.tweens[String(targs.__zigoID__)].locked = props;
- return undefined;
- }
- var _loc11_ = this.paramsObj(targs,props);
- if(_loc11_.none == true)
- {
- return undefined;
- }
- var _loc14_ = _loc11_.all;
- var _loc15_ = _loc11_.allprops;
- var _loc9_ = _loc14_ != true ? Object(_loc11_.tg) : this.tweens;
- var _loc8_ = 0;
- for(var _loc16_ in _loc9_)
- {
- var _loc7_ = _loc14_ != true ? String(_loc9_[_loc16_].__zigoID__) : _loc16_;
- var _loc5_ = this.tweens[_loc7_];
- var _loc4_ = _loc15_ != true ? _loc11_.props : _loc5_.props;
- if(_loc4_.ALLCOLOR == true)
- {
- _loc4_[_loc5_.colorProp] = true;
- delete _loc4_.ALLCOLOR;
- }
- for(var _loc10_ in _loc4_)
- {
- _loc8_ = _loc8_ + 1;
- var _loc2_ = _loc5_.props[_loc10_];
- if(type == "rewind")
- {
- if(pauseFlag == true)
- {
- _loc2_.pt = this.now;
- }
- _loc2_.ts = this.now;
- if(noEvents != true)
- {
- _loc2_.sf = false;
- if(_loc2_.scb != undefined)
- {
- _loc2_.scb.fired = false;
- }
- }
- }
- else if(type == "ff")
- {
- if(noEvents == true)
- {
- _loc2_.suppressEnd = true;
- }
- _loc2_.o = true;
- _loc2_.pt = -1;
- _loc2_.ts = this.now - _loc2_.d;
- }
- else if(type == "skipTo")
- {
- _loc2_.ts = Math.min(this.now,_loc2_.ts + (this.now - _loc2_.ts) - skipTo * 1000);
- }
- else if(type == "pause")
- {
- if(_loc2_.pt == -1)
- {
- _loc2_.pt = this.now;
- }
- }
- else if(type == "unpause")
- {
- if(_loc2_.pt != -1)
- {
- _loc2_.ts = this.now - (_loc2_.pt - _loc2_.ts);
- _loc2_.pt = -1;
- }
- }
- }
- }
- if(type == "ff" && _loc8_ > 0)
- {
- this.update();
- }
- else if(type == "rewind" && _loc8_ > 0)
- {
- this.update(true);
- }
- }
- function getStatus(type, targ, param)
- {
- if(targ == null)
- {
- return null;
- }
- var _loc8_ = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
- var _loc4_ = this.tweens[String(targ.__zigoID__)];
- switch(type)
- {
- case "paused":
- var _loc2_ = _loc4_.props;
- if(param != null)
- {
- if(_loc2_[String(param)] == undefined)
- {
- return false;
- }
- return Boolean(_loc2_[String(param)].pt != -1);
- }
- for(var _loc6_ in _loc2_)
- {
- if(_loc2_[_loc6_].pt != -1)
- {
- return true;
- }
- }
- return false;
- break;
- case "active":
- if(param == null)
- {
- return Boolean(_loc4_ != undefined);
- }
- if(String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR)
- {
- return Boolean(_loc4_.colorProp != undefined);
- }
- return Boolean(_loc4_.props[String(param)] != undefined);
- break;
- case "count":
- if(!_loc8_)
- {
- return _loc4_.numProps;
- }
- var _loc3_ = 0;
- for(_loc6_ in this.tweens)
- {
- _loc3_ += this.tweens[_loc6_].numProps;
- }
- return _loc3_;
- break;
- case "locked":
- return _loc4_.locked;
- default:
- }
- }
- function update(force)
- {
- var _loc22_ = {};
- var _loc24_ = {};
- var _loc23_ = {};
- var _loc15_ = {};
- var _loc13_ = {};
- var _loc14_ = {};
- var _loc26_ = false;
- var _loc20_ = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
- for(var _loc35_ in this.tweens)
- {
- var _loc12_ = this.tweens[_loc35_];
- var _loc5_ = _loc12_.targ;
- var _loc34_ = _loc12_.props;
- var _loc21_ = _loc5_._listeners.length > 0;
- if(_loc5_.__zigoID__ == undefined)
- {
- _loc26_ = true;
- if(com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)
- {
- var _loc25_ = [];
- for(var _loc30_ in _loc34_)
- {
- _loc25_.unshift(_loc30_);
- }
- com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt",{target:(typeof _loc5_.addProperty != "function" ? "[MISSING:" + _loc12_.targID + "]" : _loc5_),props:_loc25_,__zigoID__:_loc12_.targZID,during:"update"});
- }
- }
- else
- {
- for(_loc30_ in _loc34_)
- {
- var _loc3_ = _loc34_[_loc30_];
- if(!((_loc3_.ts > this.now || _loc3_.pt != -1) && force != true))
- {
- var _loc9_ = this.now >= _loc3_.ts + _loc3_.d;
- if(_loc3_.complex == -1)
- {
- var _loc6_ = undefined;
- if(_loc9_ == true)
- {
- _loc6_ = _loc3_.ps + _loc3_.ch;
- if(_loc3_.cycles > 1 || _loc3_.cycles == 0)
- {
- if(_loc3_.cycles > 1)
- {
- _loc3_.cycles = _loc3_.cycles - 1;
- }
- _loc3_.ps = _loc6_;
- _loc3_.ch = - _loc3_.ch;
- _loc3_.ts = this.now;
- _loc9_ = false;
- }
- }
- else
- {
- _loc6_ = _loc3_.ef(this.now - _loc3_.ts,_loc3_.ps,_loc3_.ch,_loc3_.d,_loc3_.e1,_loc3_.e2);
- }
- if(_global.isNaN(_loc6_) == false)
- {
- if(_loc30_ != "_bezier_" && (_loc3_.rr == true || _loc20_ == true && _loc3_.rr !== false))
- {
- _loc6_ = Math.round(Number(_loc6_));
- }
- if(_loc3_.special != true)
- {
- _loc5_[_loc30_] = _loc6_;
- }
- else if(_loc3_.fmp != -1)
- {
- _loc3_.fmp.setFilterProp(_loc5_,_loc30_,_loc6_);
- }
- else if(_loc30_ == "_bezier_")
- {
- var _loc10_ = _loc3_.bz;
- var _loc18_ = _loc10_.sx + _loc6_ * (2 * (1 - _loc6_) * _loc10_.ctrlx + _loc6_ * _loc10_.chx);
- var _loc17_ = _loc10_.sy + _loc6_ * (2 * (1 - _loc6_) * _loc10_.ctrly + _loc6_ * _loc10_.chy);
- if(_loc3_.rr == true || _loc20_ == true && _loc3_.rr !== false)
- {
- _loc18_ = Math.round(Number(_loc18_));
- _loc17_ = Math.round(Number(_loc17_));
- }
- _loc5_._x = _loc18_;
- _loc5_._y = _loc17_;
- }
- else if(_loc30_ == "_frame")
- {
- MovieClip(_loc5_).gotoAndStop(Math.ceil(_loc6_));
- }
- }
- }
- else
- {
- var _loc16_ = _loc9_ == true && (_loc3_.cycles > 1 || _loc3_.cycles == 0);
- var _loc7_ = [];
- for(var _loc27_ in _loc3_.ch)
- {
- var _loc4_ = _loc3_.complex != 0 ? {} : [];
- for(var _loc28_ in _loc3_.ch[_loc27_])
- {
- var _loc8_ = _loc3_.ch[_loc27_][_loc28_];
- var _loc11_ = _loc3_.ps[_loc27_][_loc28_];
- if(_loc9_ == true)
- {
- _loc4_[_loc28_] = _loc11_ + _loc8_;
- if(_loc16_ == true)
- {
- _loc3_.ch[_loc27_][_loc28_] = - _loc8_;
- }
- }
- else
- {
- _loc4_[_loc28_] = _loc3_.ef(this.now - _loc3_.ts,_loc11_,_loc8_,_loc3_.d,_loc3_.e1,_loc3_.e2);
- }
- if(_global.isNaN(_loc4_[_loc28_]) == false)
- {
- if(_loc3_.rr == true || _loc20_ == true && _loc3_.rr !== false)
- {
- _loc4_[_loc28_] = Math.round(_loc4_[_loc28_]);
- }
- }
- if(_loc3_.fmp == -1 && _loc3_.c == -1)
- {
- _loc5_[_loc30_][_loc28_] = _loc4_[_loc28_];
- }
- }
- _loc7_.push(_loc4_);
- if(_loc3_.fmp == -1 && _loc3_.c == 2)
- {
- _loc5_[_loc30_][_loc27_] = Number(_loc4_.rb << 16 | _loc4_.gb << 8 | _loc4_.bb);
- }
- }
- if(_loc3_.fmp != -1)
- {
- if(_loc3_.c == 1)
- {
- _loc3_.fmp.setFilterProp(_loc5_,_loc30_,_loc7_[0].rb << 16 | _loc7_[0].gb << 8 | _loc7_[0].bb);
- }
- else if(_loc3_.c == 2)
- {
- var _loc19_ = [];
- for(_loc28_ in _loc7_)
- {
- _loc19_.unshift(_loc7_[_loc28_].rb << 16 | _loc7_[_loc28_].gb << 8 | _loc7_[_loc28_].bb);
- }
- _loc3_.fmp.setFilterProp(_loc5_,_loc30_,_loc19_);
- }
- }
- else if(_loc3_.c != -1)
- {
- _loc3_.c.setTransform(_loc7_[0]);
- }
- if(_loc16_ == true)
- {
- if(_loc3_.cycles > 1)
- {
- _loc3_.cycles = _loc3_.cycles - 1;
- }
- _loc9_ = false;
- _loc3_.ts = this.now;
- _loc3_.ps = _loc7_;
- }
- }
- if(_loc3_.sf == false)
- {
- if(_loc3_.v != 0)
- {
- _loc5_._visible = true;
- }
- if(_loc21_ == true)
- {
- if(_loc15_[_loc35_] == undefined)
- {
- _loc15_[_loc35_] = [_loc5_,[]];
- }
- _loc15_[_loc35_][1].unshift(_loc30_);
- }
- _loc3_.sf = true;
- }
- if(_loc3_.scb.fired == false)
- {
- _loc22_[String(_loc3_.scb.id)] = _loc3_.scb;
- _loc3_.scb.fired = true;
- }
- if(_loc21_ == true)
- {
- if(_loc13_[_loc35_] == undefined)
- {
- _loc13_[_loc35_] = [_loc5_,[]];
- }
- _loc13_[_loc35_][1].unshift(_loc30_);
- }
- if(_loc3_.ucb != undefined)
- {
- _loc24_[String(_loc3_.ucb.id)] = _loc3_.ucb;
- }
- if(_loc9_ == true)
- {
- if(_loc3_.v === -1)
- {
- _loc5_._visible = false;
- }
- if(_loc3_.suppressEnd != true)
- {
- if(_loc21_ == true)
- {
- if(_loc14_[_loc35_] == undefined)
- {
- _loc14_[_loc35_] = [_loc5_,[]];
- }
- _loc14_[_loc35_][1].unshift(_loc30_);
- }
- if(_loc3_.ecb != undefined)
- {
- _loc23_[String(_loc3_.ecb.id)] = _loc3_.ecb;
- }
- }
- delete _loc34_[_loc30_];
- if(_loc30_ == _loc12_.colorProp)
- {
- delete _loc12_.colorProp;
- }
- _loc12_.numProps = _loc12_.numProps - 1;
- if(_loc12_.numProps <= 0)
- {
- _loc26_ = true;
- }
- }
- delete _loc3_.suppressEnd;
- }
- }
- }
- }
- for(_loc35_ in _loc15_)
- {
- _loc15_[_loc35_][0].broadcastMessage("onTweenStart",{target:_loc15_[_loc35_][0],props:_loc15_[_loc35_][1]});
- }
- for(_loc35_ in _loc22_)
- {
- _loc22_[_loc35_].f.apply(_loc22_[_loc35_].s,_loc22_[_loc35_].a);
- }
- for(_loc35_ in _loc13_)
- {
- _loc13_[_loc35_][0].broadcastMessage("onTweenUpdate",{target:_loc13_[_loc35_][0],props:_loc13_[_loc35_][1]});
- }
- for(_loc35_ in _loc24_)
- {
- _loc24_[_loc35_].f.apply(_loc24_[_loc35_].s,_loc24_[_loc35_].a);
- }
- for(_loc35_ in _loc14_)
- {
- _loc14_[_loc35_][0].broadcastMessage("onTweenEnd",{target:_loc14_[_loc35_][0],props:_loc14_[_loc35_][1]});
- }
- for(_loc35_ in _loc23_)
- {
- _loc23_[_loc35_].f.apply(_loc23_[_loc35_].s,_loc23_[_loc35_].a);
- }
- if(_loc26_)
- {
- this.cleanUp();
- }
- this.now = getTimer();
- }
- function cleanUp(noInit)
- {
- for(var _loc4_ in this.tweens)
- {
- var _loc2_ = this.tweens[_loc4_].targ;
- if(this.tweens[_loc4_].numProps <= 0 || _loc2_.__zigoID__ == undefined)
- {
- if(_loc2_ != undefined && _loc2_.tween == undefined && noInit != true && _loc2_._listeners.length <= 0)
- {
- com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_loc2_);
- }
- delete this.tweens[_loc4_];
- this.numTweens = this.numTweens - 1;
- }
- }
- if(this.numTweens <= 0)
- {
- this.numTweens = 0;
- delete this.tweens;
- this.tweens = {};
- if(noInit != true)
- {
- com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this,"setup",[true]);
- }
- }
- }
- function paramsObj(targs, props, endvals, retainFade)
- {
- var _loc6_ = {};
- _loc6_.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
- _loc6_.none = Boolean(targs == null);
- if(_loc6_.all == true)
- {
- _loc6_.tg = [null];
- }
- else
- {
- _loc6_.tg = !(targs instanceof Array) ? [targs] : targs;
- for(var _loc11_ in _loc6_.tg)
- {
- var _loc7_ = _loc6_.tg[_loc11_];
- if(_loc7_ == null || !(typeof _loc7_ == "object" || typeof _loc7_ == "movieclip"))
- {
- _loc6_.tg.splice(Number(_loc11_),1);
- }
- }
- }
- _loc6_.allprops = props == null;
- var _loc1_ = undefined;
- var _loc4_ = undefined;
- var _loc3_ = {};
- if(_loc6_.allprops == false)
- {
- if(typeof props == "string" && (String(props).indexOf(" ") > -1 || String(props).indexOf(",") > -1))
- {
- props = String(props.split(" ").join("")).split(",");
- }
- _loc1_ = !(props instanceof Array) ? [props] : props.slice();
- if(endvals != undefined)
- {
- if(typeof endvals == "string" && (String(endvals).indexOf(" ") > -1 || String(endvals).indexOf(",") > -1))
- {
- endvals = String(endvals.split(" ").join("")).split(",");
- }
- _loc4_ = !(endvals instanceof Array) ? [endvals] : endvals.slice();
- while(_loc4_.length < _loc1_.length)
- {
- _loc4_.push(_loc4_[_loc4_.length - 1]);
- }
- _loc4_.splice(_loc1_.length,_loc4_.length - _loc1_.length);
- }
- for(_loc11_ in _loc1_)
- {
- var _loc2_ = Number(_loc11_);
- if(_loc1_[_loc11_] != "_scale" && _loc1_[_loc11_] != "_size")
- {
- if(_loc3_[_loc1_[_loc11_]] == undefined)
- {
- if(_loc1_[_loc11_] == "_fade" && retainFade != true)
- {
- _loc1_[_loc11_] = "_alpha";
- }
- if(String(_loc1_[_loc11_]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR)
- {
- _loc1_[_loc11_] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
- }
- _loc3_[_loc1_[_loc11_]] = true;
- }
- else
- {
- _loc1_.splice(_loc2_,1);
- _loc4_.splice(_loc2_,1);
- }
- }
- else
- {
- var _loc8_ = String(_loc1_.splice(_loc2_,1)[0]);
- var _loc5_ = _loc4_.splice(_loc2_,1)[0];
- if(_loc8_ == "_scale")
- {
- if(_loc3_._xscale == undefined)
- {
- _loc1_.splice(_loc2_,0,"_xscale");
- _loc4_.splice(_loc2_,0,_loc5_);
- _loc3_._xscale = true;
- _loc2_ = _loc2_ + 1;
- }
- if(_loc3_._yscale == undefined)
- {
- _loc1_.splice(_loc2_,0,"_yscale");
- _loc4_.splice(_loc2_,0,_loc5_);
- _loc3_._yscale = true;
- }
- }
- if(_loc8_ == "_size")
- {
- if(_loc3_._width == undefined)
- {
- _loc1_.splice(_loc2_,0,"_width");
- _loc4_.splice(_loc2_,0,_loc5_);
- _loc3_._width = true;
- _loc2_ = _loc2_ + 1;
- }
- if(_loc3_._yscale == undefined)
- {
- _loc1_.splice(_loc2_,0,"_height");
- _loc4_.splice(_loc2_,0,_loc5_);
- _loc3_._height = true;
- }
- }
- }
- }
- for(_loc11_ in _loc1_)
- {
- if(_loc1_[_loc11_] == "_xscale" && _loc3_._width == true || _loc1_[_loc11_] == "_yscale" && _loc3_._height == true)
- {
- _loc1_.splice(Number(_loc11_),1);
- _loc4_.splice(Number(_loc11_),1);
- delete _loc3_[_loc1_[_loc11_]];
- }
- }
- }
- _loc6_.pa = _loc1_;
- _loc6_.va = _loc4_;
- _loc6_.props = _loc3_;
- return _loc6_;
- }
- function getChangeObj(ps, ep, isFMP, useArray)
- {
- var _loc3_ = {map:(useArray != true ? {} : []),changed:false};
- for(var _loc7_ in ep)
- {
- if((isFMP == true && _loc7_.charAt(1) == "b" || ep[_loc7_] != ps[_loc7_] || useArray == true) && ep[_loc7_] != null && _global.isNaN(Number(ep[_loc7_])) == false)
- {
- _loc3_.map[_loc7_] = typeof ep[_loc7_] != "string" ? ep[_loc7_] - ps[_loc7_] : Number(ep[_loc7_]);
- if(_global.isNaN(_loc3_.map[_loc7_]) == true)
- {
- _loc3_.map[_loc7_] = 0;
- }
- else if(_loc3_.map[_loc7_] != 0)
- {
- _loc3_.changed = true;
- }
- }
- }
- return _loc3_;
- }
- }
-